//适配移动端
	function resize() {
		var deviceWidth = document.documentElement.clientWidth;
		if (deviceWidth < 240) deviceWidth = 240;
			document.documentElement.style.cssText = 'font-size:' + (deviceWidth / 15) + 'px!important';
	}
//	window.addEventListener('resize', resize);
	$(document).on('resize',resize)
	resize();

//页面DOM结构绘制完成后执行
$(document).on('ready',function(){
	$('#screen').fadeIn(0);
	//使得用户无法滚动
	document.documentElement.style.overflow = 'hidden';
})

$(".headerSec div").hover(function(){
	$(".headerSec div").css('background-color','#FFFFFF');
	$(".headerSec div").css('color','#357ffa');
	$(".headerSec div").css('border','1px solid #FFFFFF');
	$(".headerSec div").css('box-shadow','0 10px 25px rgba(0,52,74,0.18)');
	
	$(".headerSec section").css('background-color','rgba(0,0,0,0)');
	$(".headerSec section").css('color','#FFFFFF');
	$(".headerSec section").css('border','1px solid #FFFFFF');
	$(".headerSec section").css('box-shadow','0 10px 25px rgba(0,0,0,0)');
	
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_hl.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
},function(){
	$(".headerSec div").css('background-color','rgba(0,0,0,0)');
	$(".headerSec div").css('color','#FFFFFF');
	$(".headerSec div").css('border','1px solid #FFFFFF');
	$(".headerSec div").css('box-shadow','0 10px 25px rgba(0,0,0,0)');
	
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
})

$(".headerSec section").hover(function(){	
	$(".headerSec section").css('background-color','#FFFFFF');
	$(".headerSec section").css('color','#357ffa');
	$(".headerSec section").css('border','1px solid #FFFFFF');
	$(".headerSec section").css('box-shadow','0 10px 25px rgba(0,52,74,0.18)');
	
	$(".headerSec div").css('background-color','rgba(0,0,0,0)');
	$(".headerSec div").css('color','#FFFFFF');
	$(".headerSec div").css('border','1px solid #FFFFFF');
	$(".headerSec div").css('box-shadow','0 10px 25px rgba(0,0,0,0)');
	
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_hl.png');
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
},function(){
	$(".headerSec section").css('background-color','rgba(0,0,0,0)');
	$(".headerSec section").css('color','#FFFFFF');
	$(".headerSec section").css('border','1px solid #FFFFFF');
	$(".headerSec section").css('box-shadow','0 10px 25px rgba(0,0,0,0)');
	
	$('.iosImg').attr('src','__CDN__/assets/img/helper/icon_banner_ios_nor.png');
	$('.andImg').attr('src','__CDN__/assets/img/helper/icon_banner_Android_nor.png');
})
$(window).on('scroll',function(){
		var windowWidth = window.innerWidth; 
		var ScrTop = document.documentElement.scrollTop;
		if(windowWidth > 750){
			if(ScrTop > 0){
				$('.navbar').css('background-color','#FFFFFF');
				$('.navbar').css('box-shadow','0 10px 25px rgba(0,52,74,0.18)');
				
				$(".navbar a").css("cssText", "color:#333333 !important;");
				$(".navbar span").css("cssText", "color:#333333 !important;");
				$('.logo1').attr('src','__CDN__/assets/img/helper/logo_1.png');
				$('.selectLan').attr('src','__CDN__/assets/img/helper/arrow_2.png');
				$('.downLoad').css("color", "#ffffff");
				$('.downLoad>a').css("cssText", "color:#ffffff !important;");
				$('.downLoad').addClass('downloadBc');
				
				$(".navbar-nav a").hover(function(){
					$(this).css("cssText", "color:#357FFA !important;");
				},function(){
					$(this).css("cssText", "color:#333333 !important;")
				})
			}else{
				$('.navbar').css('background-color','rgba(0,0,0,0)');
				$('.navbar').css('box-shadow','0 0 0 rgba(0,0,0,0)');
				
				$(".navbar a").css("cssText", "color:#ffffff !important;");
				$(".navbar span").css("cssText", "color:#ffffff !important;");
				$('.logo1').attr('src','__CDN__/assets/img/helper/logo_2.png');
				$('.selectLan').attr('src','__CDN__/assets/img/helper/arrow_1.png');
				$('.downLoad').css('background-color',"#FFFFFF")
				$('.downLoad').css('color',"#357ffa")
				
				$('.downLoad>a').css("cssText", "color:#357ffa !important;");
				$('.downLoad').removeClass('downloadBc');
				
				$(".navbar-nav a").hover(function(){
					$(this).css("cssText", "color:#357FFA !important;");
				},function(){
					$(this).css("cssText", "color:#ffffff !important;")
				})
			}
		}
});

var isBegin = false;
$('.navbar-header button').on('click',function(){
	if(isBegin == false){
		$('.navbar-header button').css('width','0.76rem')
		$('.navbar-header button').css('height','0.76rem')
		$('.navbar-header button').css('top','0.74rem')
		$('.navbar-header button').css('background-image','url(__CDN__/assets/img/helper/mobile/xz4.png)')
		$('.navbar-header button').css('background-size','90%90%')
		$('.navbar-header button').css('background-position','center')
		$('.navbar-header button').css('background-color','#ffffff')
		
		$('#navbar').slideDown(250)
	}else{
		$('.navbar-header button').css('width','0.76rem')
		$('.navbar-header button').css('height','0.76rem')
		$('.navbar-header button').css('top','0.83rem')
		$('.navbar-header button').css('background-image','url(__CDN__/assets/img/helper/mobile/icon_nav.png)')
		$('.navbar-header button').css('background-size','90%90%')
		$('.navbar-header button').css('background-position','center')
		$('.navbar-header button').css('background-color','#ffffff')
		
		$('#navbar').slideUp(250)
	}
	isBegin = !isBegin
})

$('.cutLan').on('click',function(){
	//取消事件冒泡 
    event.stopPropagation(); 
	$('.lan').slideToggle(500);
})


//点击空白处隐藏弹出层，下面为滑动消失效果和淡出消失效果。
$(document).on('click',function(event){
	var _con = $('.lan');  // 设置目标区域
    if(!_con.is(event.target) && _con.has(event.target).length === 0){ // Mark 1
        //$('#divTop').slideUp('slow');  //滑动消失
        $('.lan').slideUp(500);   //淡出消失
    }
})


//点击空白处弹出框要隐藏掉
$('#screen').click(function() {
	$('#screen').fadeOut(200);
	//使得用户可以滚动
	document.documentElement.style.overflow = 'auto';
});

$('.screen_close').hover(function(){
	$('.screen_close').attr('src','__CDN__/assets/img/helper/close_hover.png');
},function(){
	$('.screen_close').attr('src','__CDN__/assets/img/helper/close_default.png');
});

// 点击关闭按钮弹出框要隐藏掉
$('.screen_close').on('click',function(){
	$('#screen').fadeOut(200);
	//使得用户可以滚动
	document.documentElement.style.overflow = 'auto';
})

//"参加活动"按钮鼠标停留样式
$(".screen_cj").hover(function(){
	$('.screen_btn').attr('src', './__CDN__/assets/img/helper/pop_btn_1.png')
},function(){
	$('.screen_btn').attr('src', './__CDN__/assets/img/helper/pop_btn.png')
})

var isBegin5 = false;
$('.navbar-nav').each(function(index,elem){
	$(this).on('click',function(e){
		$('#navbar').slideUp(250)
		if(isBegin5 == false){
			$('.navbar-header button').css('width','0.76rem')
			$('.navbar-header button').css('height','0.58rem')
			$('.navbar-header button').css('top','0.83rem')
			$('.navbar-header button').css('background-image','url(__CDN__/assets/img/helper/mobile/icon_nav.png)')
			$('.navbar-header button').css('background-color','#ffffff')
			
		}else{
			$('.navbar-header button').css('width','0.76rem')
			$('.navbar-header button').css('height','0.76rem')
			$('.navbar-header button').css('top','0.74rem')
			$('.navbar-header button').css('background-image','url(__CDN__/assets/img/helper/mobile/xz4.png)')
			$('.navbar-header button').css('background-color','#ffffff')
		}
	})
})